<?php 
 $yhendus=new mysqli("localhost", "if13", "ifikad", "if13_pikkkr");
 $kask=$yhendus->prepare(
 "SELECT kaup_teenus.id, grupinimi, nimetus, hind FROM kauba_grupp, kaup_teenus, hind WHERE hind.kaup_teenus_id=kaup_teenus.id;");
 $kask->bind_result($id, $grupinimi, $nimetus, $hind);
 $kask->execute();
?>
 <!doctype html>
<html>
 <head>
  <link rel="stylesheet" type="text/css" href="stiil.css" >

 <title>Hinnakiri</title>
 </head>
 <body>
 <h1 align="center">Hinnakiri</h1>
<table border="1px">
 <tr>
 <th>Grupp</th>
 <th>Teenus/Kaup</th>
 <th>Hind</th>
 </tr>
 <?php
 while($kask->fetch()){
 echo "
 <tr>
 <td>$grupinimi</td>
 <td>$nimetus</td>
 <td>$hind</td>
 ";
}
 ?>
</table>
<a align="center" id="tagasi"  href="./">Tagasi</a>
 </body>
</html>